<template>
  <div class="channel-module">
    <div class="channel-list-card">
      <div class="list-header">
        <div class="header-left">
          <div class="list-header-img head-stick" ></div>
          <p class="header-title">地方特色</p>
        </div>
        <div class="header-right">
          <p class="header-more" @click='goMore()' >更多</p>
          <Iconfont iconClass="iconfont iconyoujiantou1" />
        </div>
      </div>
      <div class="channel-list-connect">
        <ul>
          <li v-for="(v,index) in list" key='index'>
            <div class="invest-img">
              <img :src="v.images+'?x-oss-process=image/resize,m_fixed,h_179,w_315'" />
              <div class="audience">
                <i class="iconfont icon-user"></i>
                <div class="see"  v-html="filtNum(v.num)"></div>
              </div>
            </div>
            <p class="li-title">{{v.title}}</p>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>
<script>

export default {
  components: {
  },
  props: {
    list: {
      type: Array
    }
  },
  methods: {
    // 观众数量 以万为单位
    filtNum(num) {
        if (num > 10000) {
          num =  `${(num/10000).toFixed(1)}万` 
        } 
        return num
    },
    goMore() {
      this.$router.push({
        path: `/${this.$channel}/localMore`
      })
    }
  },
};

</script>
<style scoped>
.channel-list-card {
  width: 690px;
  background: white;
  border-radius: 12px;
  margin: 20px auto;
}

.list-header {
  width: 690px;
  height: 88px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
}
.header-left,
.header-right {
  flex: 1;
  display: flex;
}

.header-left {
  height: 88px;
  padding: 26px 0;
  margin-left: 25px;
  box-sizing: border-box;
}

.header-right {
  align-items: center;
  height: 88px;
  justify-content: flex-end;
  margin-right: 20px;
}

.header-title {
  height: 28px;
  font-size: 28px;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  margin-left: 12px;
  align-self: center;
}

.head-stick {
  width:4px;
  height:32px;
  background:rgba(225,45,54,1);
  border-radius:2px;
  align-self: center;
}

.header-more {
  font-size: 22px;
  font-weight: 300;
  color: rgba(102, 102, 102, 1);
  line-height: 40px;
  margin-right: 6px;
}

.channel-list-connect {
  width: 100%;
  margin-top: 5px;
}

.channel-list-connect ul {
  width: 690px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 10px;
  box-sizing: border-box;
  display:flex;
  flex-wrap: wrap;
  justify-content: space-between;
}


.channel-list-connect ul li {
  width: 320px;
  position: relative;
  padding-bottom: 20px;
}
	
.channel-list-connect ul li {
  width: 320px;
  position: relative;
  padding-bottom: 20px;
}

.invest-img {
  position: relative;
  height: 181.8px;
  margin-bottom: 20px;
}

.channel-list-connect ul li img {
  width: 320px;
  height: 181.8px;
  border-radius: 8px;
}
.audience {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 30px;
  padding: 4px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background:rgba(0,0,0,0.6);
  border-radius:8px 0px 8px 0px;
}

.iconfont.icon-user {
  color: #fff;
}

.li-title {
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 28px;
  font-weight: 400;
  color: #333333;
  margin-top: 18px;
  padding-left: 6px;
  margin-bottom: 10px;
}

.see {
  color: #fff;
  font-size:16px;
  padding-left: 4px;
}
</style>